package com.yds.ydsdatasetbackend.model.vo;

import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.annotation.*;
import com.yds.ydsdatasetbackend.model.dto.file.predict.common.PredictResult;
import com.yds.ydsdatasetbackend.model.entity.Patient;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * 病人表
 * @TableName patient
 */
@TableName(value ="patient")
@Data
public class PatientVO implements Serializable {
    /**
     * id
     */
    private Long id;

    /**
     * 训练 id
     */
    private Long predictId;

    /**
     * 用户 id
     */
    private Long userId;

    /**
     * 训练 id
     */
    private Long groupId;

    /**
     * 病人名称
     */
    private String patientName;

    /**
     * 备注
     */
    private String note;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 预测信息
     */
    private FilePredictVO filePredictVO;

    /**
     * 分组信息
     */
    private PatientGroupVO patientGroupVO;

    /**
     * 封装类转对象
     */
    public static Patient voToObj(PatientVO patientVO) {
        if (patientVO == null) {
            return null;
        }
        Patient patient = new Patient();
        BeanUtils.copyProperties(patientVO, patient);
        return patient;
    }

    /**
     * 对象转封装类
     */
    public static PatientVO objToVo(Patient patient) {
        if (patient == null) {
            return null;
        }
        PatientVO patientVO = new PatientVO();
        BeanUtils.copyProperties(patient, patientVO);
        return patientVO;
    }
    
    
    
    private static final long serialVersionUID = 1L;
}